package org.yaukie.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ObjectUtil {
    private static final Logger log = LoggerFactory.getLogger(ObjectUtil.class);

    public ObjectUtil() {
    }

    public static Object newInstance(String className) {
        Class<?> cls = ClassUtil.loadClass(className, false);

        try {
            Object instance = cls.newInstance();
            return instance;
        } catch (Exception var4) {
            log.error("实例化对象失败！");
            throw new RuntimeException(var4);
        }
    }
}